<% include ../inc-head.ejs %>


<div class="container" style="margin-top: 100px;width:400px;text-align: center">
    <form id="form1">
        <div class="input-group">
            <span class="input-group-addon">帐号</span>
            <input type="text" class="form-control notnull" placeholder="Username">
        </div>

        <div class="input-group" style="margin-top: 30px;">
            <span class="input-group-addon">密码</span>
            <input type="password" class="form-control notnull" placeholder="Password">
        </div>

        <button type="button" id="btnSignIn" class="btn btn-default btn-sm" style="margin-top: 30px;">登录</button>
    </form>
</div>
<script>
    $(function(){
         $("#btnSignIn").click(function(){
             mainfn.checkForm($("#form1"),function(success){
                 if(success){
                     $.post("/signin/checklogin",{account:$("input[type='text']").val(),password:$("input[type='password']").val()},function(json){
                         if(json.flag){
                             document.location.replace('/');
                         }
                     });
                 }
             });
         });
    });
</script>

<% include ../inc-foot.ejs %>